Class: CheckIn::Text

Inherits:
Object
  • Object
show all
Includes:
RSpec::Expectations, RSpec::Matchers
Defined in:
lib/cucumber/pickles/steps/check_in/text.rb

Instance Method Summary collapse

Constructor Details

#initialize(label, value, within) ⇒ Text

Returns a new instance of Text.



6
7
8
9
10
# File 'lib/cucumber/pickles/steps/check_in/text.rb', line 6

def initialize(label, value, within)
  @label = label
  @value = value
  @within = within || Capybara.current_session
end

Instance Method Details

#callObject



12
13
14
15
# File 'lib/cucumber/pickles/steps/check_in/text.rb', line 12

def call
  expect(@within).to have_content(@value)
  expect(@within).to have_content(@label)
end