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

Fix some Spanish name conjunctions #6

Merged
merged 1 commit into from
Mar 6, 2015
Merged

Fix some Spanish name conjunctions #6

merged 1 commit into from
Mar 6, 2015

Conversation

bobjflong
Copy link
Contributor

No description provided.

tenderlove added a commit that referenced this pull request Mar 6, 2015
Fix some Spanish name conjunctions
@tenderlove tenderlove merged commit 67ad64c into tenderlove:master Mar 6, 2015
@bobjflong
Copy link
Contributor Author

thanks @tenderlove

@aprescott
Copy link

I think this breaks the test suite, because options[:spanish] isn't specified in the tests.

TestNameCase#test_namecase [test/test_namecase.rb:34]:
Expected: "Ruiz y Picasso"
  Actual: "Ruiz Y Picasso"

@aprescott
Copy link

Although I see that spanish: true is a default in lib/namecase.rb... But still, failing tests on master.

@bobjflong
Copy link
Contributor Author

@aprescott that's weird. Are you 100% sure you're running latest master? You should see this stuff in namecase.rb:

    if options[:spanish]
      ["Y", "E", "I"].each do |conjunction|
        localstring.gsub!(/\b#{conjunction}\b/, conjunction.downcase)
      end
    end

FWIW I just pulled from master, and had to fixup the test class to be:

class TestNameCase < Minitest::Unit::TestCase

And I get a clean test run:

namecase ➤ bundle exec rake                                                                                          git:master*
/Users/bob/.rbenv/versions/2.1.6/bin/ruby -w -Ilib:bin:test:. -e 'require "rubygems"; require "minitest/autorun"; require "test/test_namecase.rb"' -- 
Run options: --seed 48372

# Running tests:

...

Finished tests in 0.007776s, 385.8025 tests/s, 24305.5556 assertions/s.

3 tests, 189 assertions, 0 failures, 0 errors, 0 skips

@aprescott
Copy link

Hm, I think you might be right. I think the test might have been using a previously installed gem instead of what's in lib/ (by adding lib/ to $LOAD_PATH instead of doing require "rubygems"). I had problems running it with bundle exec rake so I was doing ruby test/test_namecase.rb. Guess it's fine!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants