WpTimthumb#== specs
This commit is contained in:
@@ -10,4 +10,22 @@ describe WpTimthumb do
|
|||||||
let(:uri) { URI.parse('http://example.com/') }
|
let(:uri) { URI.parse('http://example.com/') }
|
||||||
let(:options) { { path: 'path-to/a/timtuhumb.php' } }
|
let(:options) { { path: 'path-to/a/timtuhumb.php' } }
|
||||||
|
|
||||||
|
describe '#==' do
|
||||||
|
context 'when both url are equal' do
|
||||||
|
it 'returns true' do
|
||||||
|
WpTimthumb.new(uri, path: 'timtuhumb.php').
|
||||||
|
should ==
|
||||||
|
WpTimthumb.new(uri, path: 'timtuhumb.php')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
context 'when urls are different' do
|
||||||
|
it 'returns false' do
|
||||||
|
WpTimthumb.new(uri, path: 'hello/timtuhumb.php').
|
||||||
|
should_not ==
|
||||||
|
WpTimthumb.new(uri, path: 'some-dir/timtuhumb.php')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user