Skip to content

Commit

Permalink
Merge e08ecb0 into 7184dca
Browse files Browse the repository at this point in the history
  • Loading branch information
sue445 committed Jan 2, 2014
2 parents 7184dca + e08ecb0 commit 9eb14b5
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
2 changes: 1 addition & 1 deletion lib/rubicure/core.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def all_stars
@all_stars << Rubicure::Girl.find(girl_name)
end

@all_stars.uniq!{|girl| girl.precure_name }
@all_stars.uniq!{|girl| girl.human_name }
end

@all_stars
Expand Down
15 changes: 15 additions & 0 deletions spec/core_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,19 @@

it{ expect{|b| instance.each_with_series(&b) }.to yield_successive_args *@expected_series }
end

describe "#all_stars" do
subject{ instance.all_stars }

before do
human_names = []
config_file = "#{File.dirname(__FILE__)}/../config/girls.yml"
Pathname(config_file).each_line do |line|
human_names << $1 if line =~ /human_name:\s*(.+)\s*/
end
@precure_count = human_names.uniq.count
end

its(:count){ should == @precure_count }
end
end
14 changes: 0 additions & 14 deletions spec/rubicure_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,18 +109,4 @@
it{ expect( Milky.rose.precure_name ).to eq "ミルキィローズ"}
end
end

describe "#all_stars" do
subject{ Precure.all_stars }

before do
@precure_count = 0
config_file = "#{File.dirname(__FILE__)}/../config/girls.yml"
Pathname(config_file).each_line do |line|
@precure_count += 1 if line =~ /[a-z_]+:\s*&[a-z_]+/
end
end

its(:count){ should == @precure_count }
end
end

0 comments on commit 9eb14b5

Please sign in to comment.