Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: opal/opal-browser
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1652ead3c877
Choose a base ref
...
head repository: opal/opal-browser
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 50bd6b6bf053
Choose a head ref
  • 2 commits
  • 4 files changed
  • 1 contributor

Commits on Jan 28, 2014

  1. Copy the full SHA
    d610d61 View commit details
  2. Copy the full SHA
    50bd6b6 View commit details
Showing with 16 additions and 16 deletions.
  1. +8 −8 spec/event_source_spec.rb
  2. +5 −5 spec/history_spec.rb
  3. +1 −1 spec/runner.rb
  4. +2 −2 spec/socket_spec.rb
16 changes: 8 additions & 8 deletions spec/event_source_spec.rb
Original file line number Diff line number Diff line change
@@ -5,37 +5,37 @@
async 'creates it' do
Browser::EventSource.new '/events' do |es|
es.on :open do |e|
es.close

async {
expect(e.target).to be_a(Browser::EventSource)
}

es.close
end
end
end

async 'receives an unnamed event' do
Browser::EventSource.new '/events' do |es|
es.on :message do |e|
e.off
es.close

async {
expect(e.data).to eq('lol')
}

e.off
es.close
end
end
end

async 'receives a named event' do
Browser::EventSource.new '/events' do |es|
es.on :custom do |e|
e.off
es.close

async {
expect(e.data).to eq('omg')
}

e.off
es.close
end
end
end
10 changes: 5 additions & 5 deletions spec/history_spec.rb
Original file line number Diff line number Diff line change
@@ -25,11 +25,11 @@
expect($window.history.current).to eq('/wut')

$window.on 'pop:state' do |e|
e.off

async {
expect($window.history.current).to eq('/')
}

e.off
end

$window.history.back
@@ -44,11 +44,11 @@
$window.history.state.should eq(23)

$window.on 'pop:state' do |e|
e.off

async {
true.should eq(true)
expect(true).to eq(true)
}

e.off
end

$window.history.back(2)
2 changes: 1 addition & 1 deletion spec/runner.rb
Original file line number Diff line number Diff line change
@@ -46,7 +46,7 @@

browser = Selenium::WebDriver.for(:remote, url: hub, desired_capabilities: cap)
browser.navigate.to('http://localhost:9292')
rescue Exception
rescue Selenium::WebDriver::Error::UnknownError
retry
end

4 changes: 2 additions & 2 deletions spec/socket_spec.rb
Original file line number Diff line number Diff line change
@@ -28,15 +28,15 @@
async 'sends messages' do
Browser::Socket.new ws do |s|
s.on :message do |e|
e.off

s.print 'omg'

s.on :message do |e|
async {
expect(e.data).to eq('omg')
}
end

e.off
end
end
end