Permalink
Browse files

+ identifiers should be identifiers

  • Loading branch information...
1 parent 9036ab4 commit 4824e19f408a0b75eb25361e7b6c5b72795d2b74 @floere committed Nov 30, 2011
@@ -59,7 +59,7 @@ def initialize name, category, weights_strategy, partial_strategy, similarity_st
reset_backend
end
def identifier
- "#{category.identifier}:#{name}"
+ :"#{category.identifier}:#{name}"
end
# If no specific backend has been set,
@@ -136,7 +136,7 @@ def index_directory
# Identifier for technical output.
#
def identifier
- "#{@index.identifier}:#{name}"
+ :"#{@index.identifier}:#{name}"
end
#
@@ -16,7 +16,7 @@
describe 'identifier' do
it 'is correct' do
- bundle.identifier.should == 'some_index:some_category:some_name'
+ bundle.identifier.should == :'some_index:some_category:some_name'
end
end
@@ -73,7 +73,7 @@
describe 'identifier' do
it 'should return a specific identifier' do
- @bundle.identifier.should == 'some_index:some_category:some_name'
+ @bundle.identifier.should == :'some_index:some_category:some_name'
end
end
@@ -11,8 +11,8 @@
let(:bundle) { described_class.new :some_name, @category, @weights, :some_partial, @similarity }
describe 'identifier' do
- it 'is correct' do
- bundle.identifier.should == 'some_index:some_category:some_name'
+ it 'should return a specific identifier' do
+ bundle.identifier.should == :'some_index:some_category:some_name'
end
end
@@ -35,12 +35,6 @@
end
end
- describe 'identifier' do
- it 'should return a specific identifier' do
- bundle.identifier.should == 'some_index:some_category:some_name'
- end
- end
-
describe 'dump' do
it 'should trigger dumps' do
bundle.stub! :timed_exclaim
@@ -25,7 +25,7 @@
describe 'hash' do
it 'should hash the token and the bundle' do
- @combination.hash.should == [@token.to_s, @category].hash
+ @combination.hash.should == [@token, @category].hash
end
end

0 comments on commit 4824e19

Please sign in to comment.