Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zoholib
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gems
zoholib
Commits
0e4138c5
Commit
0e4138c5
authored
Apr 25, 2020
by
Jose Ernesto Suarez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PAsamos los tests de configuracion
parent
12742e38
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
6 deletions
+16
-6
.rspec_status
.rspec_status
+9
-0
zoholib.rb
lib/zoholib.rb
+0
-2
configuration.rb
lib/zoholib/configuration.rb
+3
-2
spec_helper.rb
spec/spec_helper.rb
+1
-0
zoholib_spec.rb
spec/zoholib_spec.rb
+3
-2
No files found.
.rspec_status
0 → 100644
View file @
0e4138c5
example_id | status | run_time |
----------------------------- | ------ | --------------- |
./spec/zoholib_spec.rb[1:1] | passed | 0.00183 seconds |
./spec/zoholib_spec.rb[1:2] | passed | 0.00144 seconds |
./spec/zoholib_spec.rb[1:3:1] | passed | 0.00112 seconds |
./spec/zoholib_spec.rb[1:3:2] | passed | 0.0012 seconds |
./spec/zoholib_spec.rb[1:3:3] | passed | 0.00009 seconds |
./spec/zoholib_spec.rb[1:3:4] | passed | 0.0002 seconds |
./spec/zoholib_spec.rb[1:3:5] | passed | 0.00022 seconds |
lib/zoholib.rb
View file @
0e4138c5
...
...
@@ -20,7 +20,6 @@ module Zoholib
end
def
self
.
configuration
puts
"Init connfig"
@configuration
||=
Configuration
.
new
end
...
...
@@ -29,7 +28,6 @@ module Zoholib
end
def
self
.
configure
puts
"configuring"
yield
(
configuration
)
end
end
lib/zoholib/configuration.rb
View file @
0e4138c5
...
...
@@ -2,11 +2,12 @@
module
Zoholib
##
# This class permits the configuration of the Zoholib
# This class permits the configuration of the Valenciaport Access.
# Is neccesary the WDSL URLs for the login and transport endpoint
# as well the array with the different credentials wich will be used
class
Configuration
attr_accessor
:client_id
,
:client_secret
,
:scope
,
:refresh_token
def
initialize
@client_id
=
nil
@client_secret
=
nil
...
...
spec/spec_helper.rb
View file @
0e4138c5
...
...
@@ -6,6 +6,7 @@ require 'zoholib'
RSpec
.
configure
do
|
conf
|
conf
.
before
(
:all
)
do
Zoholib
.
configure
do
|
config
|
puts
"Trying to config"
config
.
client_id
=
"client_id"
config
.
client_secret
=
"client_secret"
config
.
scope
=
"scope"
...
...
spec/zoholib_spec.rb
View file @
0e4138c5
require
'./lib/zoholib'
require
'spec_helper'
require
'stringio'
RSpec
.
describe
Zoholib
do
it
'has a version number'
do
...
...
@@ -23,7 +24,7 @@ RSpec.describe Zoholib do
end
it
'The scopes is a string'
do
expect
(
Zoholib
.
configuration
.
scope
s
).
to
be_an
(
String
)
expect
(
Zoholib
.
configuration
.
scope
).
to
be_an
(
String
)
end
it
'The refresh_token is a string'
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment