Skip to content
This repository has been archived by the owner on Oct 27, 2021. It is now read-only.

Commit

Permalink
failure message cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
dchelimsky committed Feb 18, 2009
1 parent de0bb6e commit 2cb6bd7
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 16 deletions.
2 changes: 1 addition & 1 deletion lib/spec/matchers/be_instance_of.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def matches?(actual)
end

def description
"be instance of #{@expected}"
"be an instance of #{@expected}"
end

def failure_message
Expand Down
2 changes: 1 addition & 1 deletion lib/spec/matchers/be_kind_of.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def matches?(actual)
end

def description
"be kind of #{@expected}"
"be a kind of #{@expected}"
end

def failure_message
Expand Down
2 changes: 1 addition & 1 deletion spec/spec/matchers/be_instance_of_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module Matchers
end

it "provides a description" do
Spec::Matchers::BeInstanceOf.new(Class).description.should == "be instance of Class"
Spec::Matchers::BeInstanceOf.new(Class).description.should == "be an instance of Class"
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/spec/matchers/be_kind_of_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module Matchers
end

it "provides a description" do
Spec::Matchers::BeKindOf.new(Class).description.should == "be kind of Class"
Spec::Matchers::BeKindOf.new(Class).description.should == "be a kind of Class"
end
end
end
Expand Down
12 changes: 0 additions & 12 deletions spec/spec/matchers/description_generation_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,6 @@
Spec::Matchers.generated_description.should == "should be between 0 and 10"
end

it "should be_few_words predicate should be transformed to 'be few words'" do
5.should be_kind_of(Fixnum)
Spec::Matchers.generated_description.should == "should be kind of Fixnum"
end

it "should preserve a proper prefix for be predicate" do
5.should be_a_kind_of(Fixnum)
Spec::Matchers.generated_description.should == "should be a kind of Fixnum"
5.should be_an_instance_of(Fixnum)
Spec::Matchers.generated_description.should == "should be an instance of Fixnum"
end

it "should equal" do
expected = "expected"
expected.should equal(expected)
Expand Down

0 comments on commit 2cb6bd7

Please sign in to comment.