Sha256: de4e770dc19527121e0ee75ad1109b50a1186051cce3dc48e5921dc3e7de51ae

Contents?: true

Size: 700 Bytes

Versions: 1

Compression:

Stored size: 700 Bytes

Contents

require "spec_helper"

describe HelperExampleGroupBehaviour do
  it "is included in specs in ./spec/views" do
    stub_metadata(
      :example_group => {:file_path => "./spec/helpers/whatever_spec.rb:15"}
    )
    group = RSpec::Core::ExampleGroup.describe
    group.included_modules.should include(HelperExampleGroupBehaviour)
  end

  module ::FoosHelper; end

  it "provides a controller_path based on the helper module's name" do
    helper_spec = Object.new
    helper_spec.extend HelperExampleGroupBehaviour::InstanceMethods
    helper_spec.stub_chain(:running_example, :example_group, :describes).and_return(FoosHelper)
    helper_spec.__send__(:_controller_path).should == "foos"
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rspec-rails-2.0.0.beta.9.1 spec/rspec/rails/example/helper_example_group_spec.rb