Skip to content
This repository has been archived by the owner on Sep 30, 2018. It is now read-only.

Commit

Permalink
Minor spec clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
adambeynon committed Sep 5, 2013
1 parent 4b3898a commit ea44b59
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions spec/router_spec.rb
Expand Up @@ -3,20 +3,16 @@
describe Vienna::Router do
let(:router) { Vienna::Router.new }

def set_native_hash hash
`window.location.hash = #{hash}`
end

describe "#update" do
it "should update Router.path" do
set_native_hash '#/hello/world'
$global.location.hash = "#/hello/world"
router.update

router.path.should eq('/hello/world')
end

it "calls #match with the new @path" do
set_native_hash '#/foo/bar'
$global.location.hash = "#/foo/bar"
called = nil

router.define_singleton_method(:match) { |m| called = m }
Expand Down

0 comments on commit ea44b59

Please sign in to comment.