spec/entry_spec.rb in appstats-0.20.8 vs spec/entry_spec.rb in appstats-0.20.9

- old
+ new

@@ -191,48 +191,48 @@ entry.raw_entry.should == "blah" entry.occurred_at.should == nil end it "should understand an entry without contexts" do - entry = Entry.create_from_logger_string("0.20.8 setup[:,=,-n] 2010-09-21 23:15:20 action=address_search") + entry = Entry.create_from_logger_string("0.20.9 setup[:,=,-n] 2010-09-21 23:15:20 action=address_search") Entry.count.should == @before_count + 1 entry.action.should == "address_search" - entry.raw_entry.should == "0.20.8 setup[:,=,-n] 2010-09-21 23:15:20 action=address_search" + entry.raw_entry.should == "0.20.9 setup[:,=,-n] 2010-09-21 23:15:20 action=address_search" entry.occurred_at.should == Time.parse("2010-09-21 23:15:20") end it "should understand contexts" do - entry = Entry.create_from_logger_string("0.20.8 setup[:,=,-n] 2010-09-21 23:15:20 action=address_filter : app_name=Market : server=Live") + entry = Entry.create_from_logger_string("0.20.9 setup[:,=,-n] 2010-09-21 23:15:20 action=address_filter : app_name=Market : server=Live") Entry.count.should == @before_count + 1 entry.action.should == "address_filter" - entry.raw_entry.should == "0.20.8 setup[:,=,-n] 2010-09-21 23:15:20 action=address_filter : app_name=Market : server=Live" + entry.raw_entry.should == "0.20.9 setup[:,=,-n] 2010-09-21 23:15:20 action=address_filter : app_name=Market : server=Live" entry.occurred_at.should == Time.parse("2010-09-21 23:15:20") entry.contexts.size.should == 2 entry.contexts[0].context_key = "app_name" entry.contexts[0].context_value = "Market" entry.contexts[1].context_key = "server" entry.contexts[1].context_value = "Live" end it "should handle 'action' as a context" do - entry = Entry.create_from_logger_string('0.20.8 setup[:,=,-n] 2011-02-24 12:59:57 action=page-view : action=save_ovcen : app_name=cdb') + entry = Entry.create_from_logger_string('0.20.9 setup[:,=,-n] 2011-02-24 12:59:57 action=page-view : action=save_ovcen : app_name=cdb') Entry.count.should == @before_count + 1 entry.action.should == "page-view" - entry.raw_entry.should == "0.20.8 setup[:,=,-n] 2011-02-24 12:59:57 action=page-view : action=save_ovcen : app_name=cdb" + entry.raw_entry.should == "0.20.9 setup[:,=,-n] 2011-02-24 12:59:57 action=page-view : action=save_ovcen : app_name=cdb" entry.occurred_at.should == Time.parse("2011-02-24 12:59:57") entry.contexts.size.should == 2 entry.contexts[0].context_key = "action" entry.contexts[0].context_value = "save_ovcen" entry.contexts[1].context_key = "app_name" entry.contexts[1].context_value = "cdb" end it "should handle multiple of the same 'context'" do - entry = Entry.create_from_logger_string('0.20.8 setup[:,=,-n] 2011-02-24 12:59:57 action=page-view : app_name=market : app_name=cdb') + entry = Entry.create_from_logger_string('0.20.9 setup[:,=,-n] 2011-02-24 12:59:57 action=page-view : app_name=market : app_name=cdb') Entry.count.should == @before_count + 1 entry.action.should == "page-view" - entry.raw_entry.should == "0.20.8 setup[:,=,-n] 2011-02-24 12:59:57 action=page-view : app_name=market : app_name=cdb" + entry.raw_entry.should == "0.20.9 setup[:,=,-n] 2011-02-24 12:59:57 action=page-view : app_name=market : app_name=cdb" entry.occurred_at.should == Time.parse("2011-02-24 12:59:57") entry.contexts.size.should == 2 entry.contexts[0].context_key = "app_name" entry.contexts[0].context_value = "market" entry.contexts[1].context_key = "app_name" \ No newline at end of file