Class: CheckIn::Video

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

Instance Method Summary collapse

Constructor Details

#initialize(label = nil, value, within) ⇒ Video

Returns a new instance of Video.



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

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

Instance Method Details

#call(is_not) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/cucumber/pickles/steps/check_in/video.rb', line 12

def call(is_not)
  if is_not
    expect(@within).not_to have_selector("iframe[src*=#@value]")
  else
    expect(@within).to have_selector("iframe[src*=#@value]")
  end
end