Skip to content

Commit

Permalink
fixed the time used in the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Gibheer committed Feb 10, 2012
1 parent 7aeb645 commit b5181aa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spec/unit/eventstorm_spec.rb
Expand Up @@ -4,7 +4,7 @@
describe Eventstorm do
# set some used defualts and mocks
let (:connstr) { "tcp://127.0.0.1:32198" }
let (:current_time) { Time.now }
let (:current_time) { Time.now.iso8601 }
let (:zmq_socket) { double(ZMQ::Socket) }
let (:zmq_context) { double(ZMQ::Context) }

Expand Down Expand Up @@ -67,12 +67,12 @@
it "uses bson for transport" do
Eventstorm::fire()
BSON::deserialize(get_encoded_message
)['event_time'].should == current_time.iso8601
)['event_time'].should == current_time
end

it "adds a timestamp" do
Eventstorm::fire()
get_message.should == {'event_time' => current_time.iso8601 }
get_message.should == {'event_time' => current_time}
end

it "fires an event when given a key value pair" do
Expand All @@ -86,7 +86,7 @@
end

it "fires an event when given a hash of multiple keys" do
sample = {'a' => 'b', 'c' => 23, 'event_time' => current_time.to_s}
sample = {'a' => 'b', 'c' => 23, 'event_time' => current_time}
Eventstorm::fire(sample)
get_message.should == sample
end
Expand Down

0 comments on commit b5181aa

Please sign in to comment.