class Shoulda::Matchers::Integrations::TestFrameworks::RspecExpectations
@private
Public Instance Methods
include(*modules, **_options)
click to toggle source
# File lib/shoulda/matchers/integrations/test_frameworks/cucumber.rb, line 17 def include(*modules, **_options) ::RSpec::Matchers.send(:include, *modules) rescue NameError if (require("rspec/expectations")) retry else raise_error end rescue LoadError raise_error end
n_unit?()
click to toggle source
# File lib/shoulda/matchers/integrations/test_frameworks/cucumber.rb, line 29 def n_unit? false end
present?()
click to toggle source
# File lib/shoulda/matchers/integrations/test_frameworks/cucumber.rb, line 33 def present? true end
raise_error()
click to toggle source
# File lib/shoulda/matchers/integrations/test_frameworks/cucumber.rb, line 37 def raise_error raise TestFrameworkNotFound, <<-EOT You have to include the 'rspec-expectations' gem to Gemfile, and add the line before requiring the shoulda matchers: require 'rspec/expectations' EOT end
validate!()
click to toggle source
# File lib/shoulda/matchers/integrations/test_frameworks/cucumber.rb, line 11 def validate! return if defined?(::RSpec) && defined?(::RSpec::Matchers) raise_error end