lib/bbq/rspec.rb in bbq-0.0.2.beta.1 vs lib/bbq/rspec.rb in bbq-0.0.2.beta.2

- old
+ new

@@ -10,24 +10,10 @@ alias :scenario :it end end end - class TestUser - def see!(*args) - args.each do |arg| - page.should have_content(arg) - end - end - - def not_see!(*args) - args.each do |arg| - page.should have_no_content(arg) - end - end - end - module RSpecMatchers class TestUserEyes def initialize(negative, *args) @args, @negative = args, negative end @@ -63,9 +49,27 @@ TestUserEyes.new(false, *args) end def not_see(*args) TestUserEyes.new(true, *args) + end + end + + class TestUser + include RSpec::Matchers + include Capybara::RSpecMatchers + include Bbq::RSpecMatchers + + def see!(*args) + args.each do |arg| + page.should have_content(arg) + end + end + + def not_see!(*args) + args.each do |arg| + page.should have_no_content(arg) + end end end end def self.feature(*args, &block)