Sha256: f9ccfdb763f37035f1c13bf737e087e28d682c1184e43bbc8b62787b019fcc77

Contents?: true

Size: 609 Bytes

Versions: 2

Compression:

Stored size: 609 Bytes

Contents

require 'spec_helper'

class TestUserWithMatchers < Bbq::Core::TestUser
  def ensure_no_red_ponycorns
    expect(self).to have_no_content('Red')
  end

  def ensure_pink_ponycorns
    expect(self).to see('Pink').within('#unicorns')
  end
end

describe 'TestUser matchers' do

  specify 'capybara matcher' do
    user = TestUserWithMatchers.new
    user.visit('/test_page')

    expect { user.ensure_no_red_ponycorns }.not_to raise_error
  end

  specify 'bbq matcher' do
    user = TestUserWithMatchers.new
    user.visit('/test_page')

    expect { user.ensure_pink_ponycorns }.not_to raise_error
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bbq-rspec-0.4.0 spec/test_user_matchers_spec.rb
bbq-rspec-0.3.0 spec/test_user_matchers_spec.rb