Sha256: 654e60c776e93e9ce5886f797f5c08ec3ea9f76ad0e2714f61c11b6b81908b10

Contents?: true

Size: 997 Bytes

Versions: 91

Compression:

Stored size: 997 Bytes

Contents

require File.dirname(__FILE__) + '/../../spec_helper.rb'

module Spec
  module Runner
    describe ClassAndArgumentsParser, ".parse" do
      
      it "should use a single : to separate class names from arguments" do
        ClassAndArgumentsParser.parse('Foo').should == ['Foo', nil]
        ClassAndArgumentsParser.parse('Foo:arg').should == ['Foo', 'arg']
        ClassAndArgumentsParser.parse('Foo::Bar::Zap:arg').should == ['Foo::Bar::Zap', 'arg']
        ClassAndArgumentsParser.parse('Foo:arg1,arg2').should == ['Foo', 'arg1,arg2']
        ClassAndArgumentsParser.parse('Foo::Bar::Zap:arg1,arg2').should == ['Foo::Bar::Zap', 'arg1,arg2']
        ClassAndArgumentsParser.parse('Foo::Bar::Zap:drb://foo,drb://bar').should == ['Foo::Bar::Zap', 'drb://foo,drb://bar']
      end

      it "should raise an error when passed an empty string" do
        lambda do
          ClassAndArgumentsParser.parse('')
        end.should raise_error("Couldn't parse \"\"")
      end      
    end
  end
end

Version data entries

91 entries across 91 versions & 12 rubygems

Version Path
dchelimsky-rspec-1.1.10 spec/spec/runner/class_and_argument_parser_spec.rb
dchelimsky-rspec-1.1.11.1 spec/spec/runner/class_and_argument_parser_spec.rb
dchelimsky-rspec-1.1.11.2 spec/spec/runner/class_and_argument_parser_spec.rb
dchelimsky-rspec-1.1.11.3 spec/spec/runner/class_and_argument_parser_spec.rb
dchelimsky-rspec-1.1.11.4 spec/spec/runner/class_and_argument_parser_spec.rb
dchelimsky-rspec-1.1.11.5 spec/spec/runner/class_and_argument_parser_spec.rb
dchelimsky-rspec-1.1.11.6 spec/spec/runner/class_and_argument_parser_spec.rb
dchelimsky-rspec-1.1.11.7 spec/spec/runner/class_and_argument_parser_spec.rb
dchelimsky-rspec-1.1.11 spec/spec/runner/class_and_argument_parser_spec.rb
dchelimsky-rspec-1.1.12 spec/spec/runner/class_and_argument_parser_spec.rb
dchelimsky-rspec-1.1.99.1 spec/spec/runner/class_and_argument_parser_spec.rb
dchelimsky-rspec-1.1.99.13 spec/spec/runner/class_and_argument_parser_spec.rb
dchelimsky-rspec-1.1.99.2 spec/spec/runner/class_and_argument_parser_spec.rb
dchelimsky-rspec-1.1.99.3 spec/spec/runner/class_and_argument_parser_spec.rb
dchelimsky-rspec-1.1.99.4 spec/spec/runner/class_and_argument_parser_spec.rb
dchelimsky-rspec-1.1.99.5 spec/spec/runner/class_and_argument_parser_spec.rb
dchelimsky-rspec-1.1.99.6 spec/spec/runner/class_and_argument_parser_spec.rb
dchelimsky-rspec-1.1.99.7 spec/spec/runner/class_and_argument_parser_spec.rb
dchelimsky-rspec-1.1.99.8 spec/spec/runner/class_and_argument_parser_spec.rb
dchelimsky-rspec-1.1.99.9 spec/spec/runner/class_and_argument_parser_spec.rb