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

Make specs work with RSpec 2 #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
14 changes: 7 additions & 7 deletions spec/lingua/en/readability_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@

describe "#flesch" do
it "should be the correct Flesch Reading Ease" do
@report.flesch.should be_close(71.471, 0.001)
@report.flesch.should be_within(0.001).of(71.471)
end
end

describe "#fog" do
it "should be the correct Gunning Fog Index" do
@report.fog.should be_close(10.721, 0.001)
@report.fog.should be_within(0.001).of(10.721)
end
end

describe "#kincaid" do
it "should be the correct Flesch-Kincaid grade level" do
@report.kincaid.should be_close(7.5, 0.1)
@report.kincaid.should be_within(0.1).of(7.5)
end
end

Expand Down Expand Up @@ -77,13 +77,13 @@

describe "#percent_fog_complex_words" do
it "should be the correct percentage of complex words according to Fog Index" do
@report.percent_fog_complex_words.should be_close(9.803, 0.001)
@report.percent_fog_complex_words.should be_within(0.001).of(9.803)
end
end

describe "#syllables_per_word" do
it "should be the correct average of syllables per word" do
@report.syllables_per_word.should be_close(1.396, 0.001)
@report.syllables_per_word.should be_within(0.001).of(1.396)
end
end

Expand All @@ -97,8 +97,8 @@

describe "#words_per_sentence" do
it "should be the correct count of words per sentence" do
@report.words_per_sentence.should be_close(17.0, 0.001)
@report.words_per_sentence.should be_within(0.001).of(17.0)
end
end

end
7 changes: 3 additions & 4 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
$LOAD_PATH.unshift(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'lingua'
require 'spec'
require 'spec/autorun'
require 'rspec/autorun'

RSpec.configure do |config|

Spec::Runner.configure do |config|

end