Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

supported rspec3 matcher protocols #1370

Merged
merged 1 commit into from
May 8, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions lib/carrierwave/test/matchers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ def negative_failure_message
"expected #{@actual.inspect} to not be identical to #{@expected.inspect}"
end

def failure_message_when_negated
negative_failure_message
end

def description
"be identical to #{@expected.inspect}"
end
Expand Down Expand Up @@ -55,6 +59,10 @@ def negative_failure_message
"expected #{@actual.current_path.inspect} not to have permissions #{@expected.to_s(8)}, but it did"
end

def failure_message_when_negated
negative_failure_message
end

def description
"have permissions #{@expected.to_s(8)}"
end
Expand Down Expand Up @@ -83,6 +91,10 @@ def negative_failure_message
"expected #{File.dirname @actual.current_path.inspect} not to have permissions #{@expected.to_s(8)}, but it did"
end

def failure_message_when_negated
negative_failure_message
end

def description
"have permissions #{@expected.to_s(8)}"
end
Expand Down Expand Up @@ -114,6 +126,10 @@ def negative_failure_message
"expected #{@actual.current_path.inspect} to be larger than #{@width} by #{@height}, but it wasn't."
end

def failure_message_when_negated
negative_failure_message
end

def description
"be no larger than #{@width} by #{@height}"
end
Expand Down Expand Up @@ -145,6 +161,10 @@ def negative_failure_message
"expected #{@actual.current_path.inspect} not to have an exact size of #{@width} by #{@height}, but it did."
end

def failure_message_when_negated
negative_failure_message
end

def description
"have an exact size of #{@width} by #{@height}"
end
Expand Down Expand Up @@ -175,6 +195,10 @@ def negative_failure_message
"expected #{@actual.current_path.inspect} not to have an exact size of #{@height}, but it did."
end

def failure_message_when_negated
negative_failure_message
end

def description
"have an exact height of #{@height}"
end
Expand Down Expand Up @@ -205,6 +229,10 @@ def negative_failure_message
"expected #{@actual.current_path.inspect} not to have an exact size of #{@width}, but it did."
end

def failure_message_when_negated
negative_failure_message
end

def description
"have an exact width of #{@width}"
end
Expand Down Expand Up @@ -235,6 +263,10 @@ def negative_failure_message
"expected #{@actual.current_path.inspect} not to be wider than #{@width}, but it is."
end

def failure_message_when_negated
negative_failure_message
end

def description
"have a width less than or equal to #{@width}"
end
Expand Down Expand Up @@ -265,6 +297,10 @@ def negative_failure_message
"expected #{@actual.current_path.inspect} not to be taller than #{@height}, but it is."
end

def failure_message_when_negated
negative_failure_message
end

def description
"have a height less than or equal to #{@height}"
end
Expand Down