Permalink
Browse files

Typos, formatting...

  • Loading branch information...
1 parent e54ba2d commit 235d3eb7f70ff267ca0413c029ac0d71cd218a2d Daniel Vartanov committed Dec 22, 2009
Showing with 30 additions and 31 deletions.
  1. +2 −2 spec/traffic/grouped_by_host_spec.rb
  2. +5 −5 spec/traffic/highest_hosts_spec.rb
  3. +23 −24 spec/traffic/scopes_spec.rb
@@ -17,15 +17,15 @@
describe "given a Traffic instance loaded with records" do
before :each do
- @traffic = Traffic.new(@records, @local_address)
+ @traffic = Traffic.new(@records)
end
describe "when after that #group_by_host is called" do
before :each do
@return_value = @traffic.grouped_by_host
end
- it "should return records grouped by *reomte* host" do
+ it "should return records grouped by *remote* host" do
@return_value.to_hash.should == {
@facebook => [Record.new(@facebook, @local_address), Record.new(@local_address, @facebook)],
@gmail => [Record.new(@gmail, @local_address), Record.new(@local_address, @gmail)]
@@ -17,10 +17,10 @@
describe "given a Traffic instance loaded with records" do
before :each do
- @traffic = Traffic.new(@records, @local_address)
+ @traffic = Traffic.new @records
end
- describe "when #hightest_hosts is called without argumcch doents" do
+ describe "when #hightest_hosts is called without argumt" do
before :each do
@return_value = @traffic.highest_hosts
end
@@ -35,8 +35,8 @@
@return_value[1].amount_of_traffic.should == 2
end
end
-
- describe "when #highest_hosts is calles with an argument" do
+
+ describe "when #highest_hosts is called with an argument" do
before :each do
@return_value = @traffic.highest_hosts(1)
end
@@ -49,4 +49,4 @@
end
end
end
-end
+end
@@ -8,45 +8,44 @@
@gmail = '77.235.14.10'
@records = [
- Record.new(@local_address, @facebook),
- Record.new(@local_address, @gmail),
- Record.new(@facebook, @local_address),
- Record.new(@gmail, @local_address)
+ Record.new(@local_address, @facebook),
+ Record.new(@local_address, @gmail),
+ Record.new(@facebook, @local_address),
+ Record.new(@gmail, @local_address)
]
end
describe "given a Traffic instance loaded with records" do
before :each do
- @traffic = Traffic.new @records
- @traffic.local_address = @local_address
+ @traffic = Traffic.new @records
end
describe "when #incoming is called" do
- before :each do
- @return_value = @traffic.incoming
- end
+ before :each do
+ @return_value = @traffic.incoming
+ end
- it "should return a Traffic instance" do
- @return_value.should be_kind_of(Traffic)
- end
+ it "should return a Traffic instance" do
+ @return_value.should be_kind_of(Traffic)
+ end
- it "should narrow records to incoming traffic only" do
- @return_value.to_set.should == [Record.new(@facebook, @local_address), Record.new(@gmail, @local_address)].to_set
- end
+ it "should narrow records to incoming traffic only" do
+ @return_value.to_set.should == [Record.new(@facebook, @local_address), Record.new(@gmail, @local_address)].to_set
+ end
end
describe "when #outcoming is called" do
- before :each do
- @return_value = @traffic.outcoming
- end
+ before :each do
+ @return_value = @traffic.outcoming
+ end
- it "should return a Traffic instance" do
- @return_value.should be_kind_of(Traffic)
- end
+ it "should return a Traffic instance" do
+ @return_value.should be_kind_of(Traffic)
+ end
- it "should narrow records to outcoming traffic only" do
- @return_value.to_set.should == [Record.new(@local_address, @facebook), Record.new(@local_address, @gmail)].to_set
- end
+ it "should narrow records to outcoming traffic only" do
+ @return_value.to_set.should == [Record.new(@local_address, @facebook), Record.new(@local_address, @gmail)].to_set
+ end
end
end
end

0 comments on commit 235d3eb

Please sign in to comment.