Module: CapybaraSfdc
- Defined in:
- lib/capybara_sfdc/rspec.rb,
lib/capybara_sfdc/config.rb,
lib/capybara_sfdc/version.rb
Defined Under Namespace
Modules: RSpec Classes: Configuration
Constant Summary collapse
- VERSION =
"0.0.1"
Class Method Summary collapse
-
.client ⇒ Object
Retrieve the databasedotcom client.
- .configuration ⇒ Object
-
.configure {|configuration| ... } ⇒ Object
Pass in a block to configure.
Class Method Details
.client ⇒ Object
Retrieve the databasedotcom client
12 13 14 |
# File 'lib/capybara_sfdc/config.rb', line 12 def client @client end |
.configuration ⇒ Object
7 8 9 |
# File 'lib/capybara_sfdc/config.rb', line 7 def configuration @configuration ||= Configuration.new end |
.configure {|configuration| ... } ⇒ Object
Pass in a block to configure
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/capybara_sfdc/config.rb', line 17 def configure yield configuration client = Databasedotcom::Client.new :client_id => configuration.client_id, :client_secret => configuration.client_secret, :host => configuration.host client.authenticate :username => configuration.username, :password => "#{CGI::escape(configuration.password)}#{configuration.security_token}" ::RSpec.configure do |config| config.before(:each) { client.cleanup } config.after(:each) { client.cleanup } config.include ::CapybaraSfdc::RSpec::Helpers end if configuration.rspec @client = client end |