Sha256: af0e511c5e65c1a9f5b764f12c87d20a6286af9e46ce426b42c2428aa84e11d2

Contents?: true

Size: 1.27 KB

Versions: 39

Compression:

Stored size: 1.27 KB

Contents

require 'spec_helper'
require 'cucumber/wire_support/wire_language'
require 'tempfile'

module Cucumber
  module WireSupport
    describe Configuration do
      let(:wire_file) { Tempfile.new('wire') }
      let(:config) { Configuration.new(wire_file.path) }
      
      def write_wire_file(contents)
        wire_file << contents
        wire_file.close
      end
      
      it "reads the hostname / port from the file" do
        write_wire_file %q{
          host: localhost
          port: 54321
        }
        config.host.should == 'localhost'
        config.port.should == 54321
      end
      
      it "reads the timeout for a specific message" do
        write_wire_file %q{
          host: localhost
          port: 54321
          timeout:
            invoke: 99
        }
        config.timeout('invoke').should == 99
      end
      
      describe "a wire file with no timeouts specified" do
        before(:each) do
          write_wire_file %q{
            host: localhost
            port: 54321
          }
        end
        
        %w(invoke begin_scenario end_scenario).each do |message|
          it "sets the default timeout for '#{message}' to 120 seconds" do
            config.timeout(message).should == 120
          end
        end
      end
    end
  end
end

Version data entries

39 entries across 37 versions & 9 rubygems

Version Path
candlepin-api-0.4.0 bundle/ruby/gems/cucumber-1.2.1/spec/cucumber/wire_support/configuration_spec.rb
candlepin-api-0.4.0 bundle/ruby/1.9.1/gems/cucumber-1.2.1/spec/cucumber/wire_support/configuration_spec.rb
candlepin-api-0.4.0 bundle/ruby/1.8/gems/cucumber-1.2.1/spec/cucumber/wire_support/configuration_spec.rb
librarian-puppet-0.9.9 vendor/gems/ruby/1.9.1/gems/cucumber-1.2.1/spec/cucumber/wire_support/configuration_spec.rb
librarian-puppet-0.9.8 vendor/gems/ruby/1.9.1/gems/cucumber-1.2.1/spec/cucumber/wire_support/configuration_spec.rb
librarian-puppet-0.9.4 vendor/gems/ruby/1.8/gems/cucumber-1.2.1/spec/cucumber/wire_support/configuration_spec.rb
casecumber-1.0.2.1 spec/cucumber/wire_support/configuration_spec.rb
casecumber-1.2.1.cb2 spec/cucumber/wire_support/configuration_spec.rb
librarian-puppet-0.9.3 vendor/gems/ruby/1.8/gems/cucumber-1.2.1/spec/cucumber/wire_support/configuration_spec.rb
cucumber-1.2.1 spec/cucumber/wire_support/configuration_spec.rb
resque-pool-0.3.0 vendor/bundle/ruby/1.8/gems/cucumber-1.1.9/spec/cucumber/wire_support/configuration_spec.rb
ftl-0.2.0 vendor/bundle/gems/cucumber-1.2.0/spec/cucumber/wire_support/configuration_spec.rb
cucumber-1.2.0 spec/cucumber/wire_support/configuration_spec.rb
frameworks-capybara-0.2.0.rc6 vendor/bundle/ruby/1.8/gems/cucumber-1.1.9/spec/cucumber/wire_support/configuration_spec.rb
frameworks-capybara-0.2.0.rc5 vendor/bundle/ruby/1.8/gems/cucumber-1.1.9/spec/cucumber/wire_support/configuration_spec.rb
frameworks-capybara-0.2.0.rc4 vendor/bundle/ruby/1.8/gems/cucumber-1.1.9/spec/cucumber/wire_support/configuration_spec.rb
frameworks-capybara-0.2.0.rc3 vendor/bundle/ruby/1.8/gems/cucumber-1.1.9/spec/cucumber/wire_support/configuration_spec.rb
frameworks-capybara-0.2.0.rc2 vendor/bundle/ruby/1.8/gems/cucumber-1.1.9/spec/cucumber/wire_support/configuration_spec.rb
resque-pool-0.3.0.beta.2 vendor/bundle/ruby/1.8/gems/cucumber-1.1.9/spec/cucumber/wire_support/configuration_spec.rb
radiant-1.0.0 ruby-debug/ruby/1.8/gems/cucumber-1.1.9/spec/cucumber/wire_support/configuration_spec.rb