Skip to content

Instantly share code, notes, and snippets.

@rauchy
Created March 16, 2012 12:08
Show Gist options
  • Select an option

  • Save rauchy/2049794 to your computer and use it in GitHub Desktop.

Select an option

Save rauchy/2049794 to your computer and use it in GitHub Desktop.

Revisions

  1. rauchy revised this gist Mar 16, 2012. 2 changed files with 2 additions and 2 deletions.
    2 changes: 1 addition & 1 deletion right_user_spec.rb
    Original file line number Diff line number Diff line change
    @@ -5,7 +5,7 @@
    subject.visited_attractions_count.should == 1
    end

    it 'doesn't increase the visited attractions count after several visits' do
    it "doesn't increase the visited attractions count after several visits" do
    5.times { subject.visit('Rome') }
    subject.visited_attractions_count.should_not > 1
    end
    2 changes: 1 addition & 1 deletion wrong_user_spec.rb
    Original file line number Diff line number Diff line change
    @@ -5,7 +5,7 @@
    subject.visited_attractions_count.should == 1
    end

    it 'doesn't increase the visited attractions count after several visits' do
    it "doesn't increase the visited attractions count after several visits" do
    5.times { subject.visit('Rome') }
    subject.visited_attractions_count.should == 1
    end
  2. rauchy revised this gist Mar 16, 2012. 3 changed files with 26 additions and 0 deletions.
    13 changes: 13 additions & 0 deletions right_user_spec.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    describe User do
    describe '#visit' do
    it 'increases the visited attractions count after one visit' do
    subject.visit('Rome')
    subject.visited_attractions_count.should == 1
    end

    it 'doesn't increase the visited attractions count after several visits' do
    5.times { subject.visit('Rome') }
    subject.visited_attractions_count.should_not > 1
    end
    end
    end
    File renamed without changes.
    13 changes: 13 additions & 0 deletions wrong_user_spec.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    describe User do
    describe '#visit' do
    it 'increases the visited attractions count after one visit' do
    subject.visit('Rome')
    subject.visited_attractions_count.should == 1
    end

    it 'doesn't increase the visited attractions count after several visits' do
    5.times { subject.visit('Rome') }
    subject.visited_attractions_count.should == 1
    end
    end
    end
  3. rauchy created this gist Mar 16, 2012.
    9 changes: 9 additions & 0 deletions gistfile1.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    class User
    def visit(attraction)
    # ...
    end

    def visited_attractions_count
    # ...
    end
    end