File: matchers.rb

package info (click to toggle)
ruby-generator-spec 0.9.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 176 kB
  • sloc: ruby: 538; makefile: 5
file content (11 lines) | stat: -rw-r--r-- 336 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
# taken from  https://raw.github.com/rspec/rspec-rails/master/spec/support/matchers.rb

RSpec::Matchers::define :be_included_in_files_in do |path|
  match do |mod|
    stub_metadata(
      :file_path => "#{path}whatever_spec.rb:15"
    )
    group = RSpec::Core::ExampleGroup.describe
    group.included_modules.include?(mod)
  end
end