Sha256: 0ff7d8729483856fe9b5cd337da9b5bf080745a8e1b14bbd989231c2db8df5a9

Contents?: true

Size: 895 Bytes

Versions: 55

Compression:

Stored size: 895 Bytes

Contents

require "spec_helper"

module RSpec::Rails
  describe RoutingExampleGroup do
    it { should be_included_in_files_in('./spec/routing/') }
    it { should be_included_in_files_in('.\\spec\\routing\\') }

    it "adds :type => :routing to the metadata" do
      group = RSpec::Core::ExampleGroup.describe do
        include RoutingExampleGroup
      end
      group.metadata[:type].should eq(:routing)
    end

    describe "named routes" do
      it "delegates them to the route_set" do
        group = RSpec::Core::ExampleGroup.describe do
          include RoutingExampleGroup
        end

        example = group.new

        # Yes, this is quite invasive
        url_helpers = double('url_helpers', :foo_path => "foo")
        routes = double('routes', :url_helpers => url_helpers)
        example.stub(:routes => routes)

        example.foo_path.should == "foo"
      end
    end
  end
end

Version data entries

55 entries across 50 versions & 5 rubygems

Version Path
judge-2.0.5 vendor/bundle/ruby/2.1.0/gems/rspec-rails-2.13.0/spec/rspec/rails/example/routing_example_group_spec.rb
rspec-rails-2.14.1 spec/rspec/rails/example/routing_example_group_spec.rb
rspec-rails-3.0.0.beta1 spec/rspec/rails/example/routing_example_group_spec.rb
rspec-rails-2.99.0.beta1 spec/rspec/rails/example/routing_example_group_spec.rb
rspec-rails-2.14.0 spec/rspec/rails/example/routing_example_group_spec.rb
rspec-rails-2.13.1 spec/rspec/rails/example/routing_example_group_spec.rb
rspec-rails-2.13.0 spec/rspec/rails/example/routing_example_group_spec.rb
rspec-rails-2.12.2 spec/rspec/rails/example/routing_example_group_spec.rb
sunrise-cms-0.5.0.rc1 vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/spec/rspec/rails/example/routing_example_group_spec.rb
rspec-rails-2.12.1 spec/rspec/rails/example/routing_example_group_spec.rb
rspec-rails-2.12.0 spec/rspec/rails/example/routing_example_group_spec.rb
rspec-rails-2.11.4 spec/rspec/rails/example/routing_example_group_spec.rb
gem_repackager-0.1.0 support/gems/rspec-rails-2.11.0/spec/rspec/rails/example/routing_example_group_spec.rb
rspec-rails-2.11.0 spec/rspec/rails/example/routing_example_group_spec.rb
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/spec/rspec/rails/example/routing_example_group_spec.rb
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/spec/rspec/rails/example/routing_example_group_spec.rb
sunrise-cms-0.3.2 vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/spec/rspec/rails/example/routing_example_group_spec.rb
sunrise-cms-0.3.2 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/spec/rspec/rails/example/routing_example_group_spec.rb
sunrise-cms-0.3.1 vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/spec/rspec/rails/example/routing_example_group_spec.rb
sunrise-cms-0.3.1 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/spec/rspec/rails/example/routing_example_group_spec.rb