spec/watirspec/cookies_spec.rb in watir-6.5.0 vs spec/watirspec/cookies_spec.rb in watir-6.6.0

- old
+ new

@@ -46,15 +46,10 @@ browser.goto set_cookie_url verify_cookies_count 1 browser.cookies.add 'foo', 'bar' verify_cookies_count 2 - - compliant_on :safari do - $browser.close - $browser = WatirSpec.new_browser - end end end # TODO - Split this up into multiple tests or figure out which parts are not compliant not_compliant_on :chrome, :internet_explorer, :safari, :firefox do @@ -116,20 +111,22 @@ expect(IO.read(file)).to eq(browser.cookies.to_a.to_yaml) end end describe '#load' do - it 'loads cookies from file' do - browser.cookies.clear - browser.cookies.load file - expected = browser.cookies.to_a - actual = YAML.load(IO.read(file)) + bug "invalid expiration issue", :firefox do + it 'loads cookies from file' do + browser.cookies.clear + browser.cookies.load file + expected = browser.cookies.to_a + actual = YAML.load(IO.read(file)) - # https://code.google.com/p/selenium/issues/detail?id=6834 - expected.each { |cookie| cookie.delete(:expires) } - actual.each { |cookie| cookie.delete(:expires) } + # https://code.google.com/p/selenium/issues/detail?id=6834 + expected.each { |cookie| cookie.delete(:expires) } + actual.each { |cookie| cookie.delete(:expires) } - expect(actual).to eq(expected) + expect(actual).to eq(expected) + end end end end def set_cookie_url