Sha256: 85c416297eda8947beabe48eaaa53836e22a1918bdf709e9521b20824a475249

Contents?: true

Size: 503 Bytes

Versions: 5

Compression:

Stored size: 503 Bytes

Contents

require 'spec_helper'

describe Cucumber::Factory do

  subject { Cucumber::Factory }

  describe 'model_class_from_prose' do

    it "should return the class matching a natural language expression" do
      subject.send(:model_class_from_prose, "movie").should == Movie
      subject.send(:model_class_from_prose, "job offer").should == JobOffer
    end

    it "should allow namespaced models" do
      subject.send(:model_class_from_prose, "people/actor").should == People::Actor
    end

  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
cucumber_factory-1.8.5 spec/factory_spec.rb
cucumber_factory-1.8.4 spec/factory_spec.rb
cucumber_factory-1.8.3 spec/factory_spec.rb
cucumber_factory-1.8.2 spec/factory_spec.rb
cucumber_factory-1.8.1 spec/factory_spec.rb