1
0
Fork 0
mirror of https://github.com/thoughtbot/shoulda-matchers.git synced 2022-11-09 12:01:38 -05:00
Commit graph

21 commits

Author SHA1 Message Date
Elliot Winkler
12cc7aaace Remove all Ruby-emitted warnings
Run RSpec tests with warnings enabled so we stay on top of this better
in the future.
2014-07-18 18:00:08 -06:00
Elliot Winkler
f13e069f09 Add missing test dependences to Appraisals
Since as of commit 2748b75087, we no
longer install dependencies inside of the Rails app that is generated
and used to run all of the tests, we have to require all of the
dependencies that the app would install inside of the appropriate
Appraisals.

This was mostly straightforward except for some workarounds with the
turn gem:

* Rails 3.1 requires two versions of turn depending on which Ruby
  version you're using. On 1.9.2, it uses turn 0.9.2; after 1.9.2, it
  uses ~> 0.9.3. To accommodate this we have to have two versions of the
  Rails 3.1 appraisal which declare the different turn versions.
* Rails 3.1 also loads the turn gem even if, in the Gemfile for the app,
  turn is declared with `require: false`. This causes a problem while
  running our tests because turn actually requires minitest/autorun,
  which adds a hook so when Ruby exits, Minitest tests are run. Because
  we're already using RSpec, Minitest will try to re-run the `rspec`
  command we ran within a Minitest environment. This will fail since we
  are using RSpec-specific command line options to run the tests.
  Unfortunately there's no way to shut off minitest/autorun after it's
  been required, so we have to monkey-patch Minitest's #run method so
it's a no-op.
2014-05-21 09:50:46 -06:00
Elliot Winkler
ce9c9b8d5b Set I18n.enforce_available_locales correctly
This setting is only available for I18n v0.6.9, so setting it for all
versions of Rails or I18n versions may not work.
2014-01-21 11:34:45 -07:00
Elliot Winkler
d597ea89f3 Fix I18n.enforce_available_locales warning
The warning message was:

  [deprecated] I18n.enforce_available_locales will default to true in
  the future. If you really want to skip validation of your locale you
  can set I18n.enforce_available_locales = false to avoid this message.
2014-01-20 11:24:00 -07:00
Elliot Winkler
4e74ba8e48 Convert to RSpec expect syntax 2014-01-20 11:17:32 -07:00
Elliot Winkler
8a0bf45d0f Refactor spec_helper
The code that sets up the blank Rails application we use for testing is
a little messy. Let's use an object to encapsulate this and then refer
to this object every time we access Rails.application.
2013-12-03 11:09:06 -05:00
Elliot Winkler
4440445baf Auto-retry bundle install when Travis runs tests
`bundle install` doesn't always work -- sometimes it runs into errors
making HTTP requests, for whatever reason. This will cause Travis to
fail which is pretty annoying.

* Travis supplies an executable called `travis_retry` which will
  automatically retry the command up to 3 times before really failing.
  Tell Travis to use this when it runs `bundle install` before it
  runs tests.
* In spec_helper, we create a Rails app and use this within the
  test suite. This will also run `bundle install`. Unfortunately we
  can't use `travis_retry` for this as it's a function and is not
  available to us in Ruby-land, so use our own retry logic.
2013-12-03 11:09:01 -05:00
Melissa Xie
6b105ba7cd Remove 'have_sent_email' matcher
* See issue #252
2013-04-03 13:08:27 -04:00
Jason Draper and George Brocklehurst
7b15429ebe Add a StrongParametersMatcher 2013-01-25 11:07:48 +01:00
Gabe Berke-Williams
af8f9a7bff Use current thoughtbot style in specs 2012-12-26 22:45:54 -05:00
Gabe Berke-Williams
4574f51692 Rearrange requires such that tests pass. 2012-03-25 16:32:26 -04:00
Gabe Berke-Williams
1c517d2795 Rearrange requires. 2012-03-23 21:00:36 -04:00
Gabe Berke-Williams
bd524833ff We don't use autorun. 2012-03-23 20:59:35 -04:00
Gabe Berke-Williams
e70e1bf9a5 Require bourne. 2012-03-23 20:00:09 -04:00
Gabe Berke-Williams
f1a3dca5b9 Update to modern thoughtbot style. 2012-03-16 12:15:23 -04:00
Blake Thomson
76600615dd Remove uglifier and coffee-rails from the 3.1 gemfile, and modify spec_helper.rb to respect a BUNDLE_GEMFILE set on the command line. 2011-11-02 08:36:01 -07:00
Prem Sichanugrist
3170294b44 Generate new Rails application every time we run RSpec 2011-05-25 15:36:13 -04:00
Joe Ferris
56b0a0439e Move into the Matchers namespace 2010-12-15 17:34:19 -05:00
Joe Ferris
2037e969dc Removed the Matchers namespace 2010-12-14 18:51:39 -05:00
Joe Ferris
4ee78bfe99 Fixes for Rails 3.0.3 and RSpec 2.3 2010-12-14 18:35:12 -05:00
Joe Ferris
6aca71765a Extracted the context framework, switched to rspec 2010-12-14 17:02:03 -05:00