Skip to content

Commit

Permalink
Fix specs (missing ut8 or sample name without accents)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yannick Francois committed Aug 26, 2013
1 parent 8f29f35 commit 9b27b06
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions spec/models/tag_spec.rb
Expand Up @@ -87,22 +87,22 @@
end

context "with a simple keyword" do
let(:article) { create(:article, keywords: "akeyword") }
let(:article) { create(:article, keywords: "foo") }
it { expect(article.tags.size).to eq(1) }
it { expect(article.tags.first).to be_kind_of(Tag) }
it { expect(article.tags.first.name).to eq('akeyword') }
it { expect(article.tags.first.name).to eq('foo') }
end

context "with two keyword separate by a coma" do
let(:article) { create(:article, keywords: "first, second") }
let(:article) { create(:article, keywords: "foo, bar") }
it { expect(article.tags.size).to eq(2) }
it { expect(article.tags.map(&:name)).to eq(['first', 'second']) }
it { expect(article.tags.map(&:name)).to eq(['foo', 'bar']) }
end

context "with two keyword with apostrophe" do
let(:article) { create(:article, keywords: "first, l'éléphant") }
let(:article) { create(:article, keywords: "foo, l'bar") }
it { expect(article.tags.size).to eq(3) }
it { expect(article.tags.map(&:name)).to eq(['first', 'l', 'éléphant']) }
it { expect(article.tags.map(&:name)).to eq(['foo', 'l', 'bar']) }
end

context "with two identical keywords" do
Expand Down

0 comments on commit 9b27b06

Please sign in to comment.