monterail / guidelines

[DEPRECATED] We are Ruby on Rails experts from Poland. Think hussars. Solid & winged. These are our guidelines.
71 stars 17 forks source link

Use new expectation syntax when using rspec #170

Closed jandudulski closed 11 years ago

jandudulski commented 11 years ago

Rspec has a new expectation syntax:

it { something.should be_valid }

# vs

it { expect(something).to be_valid }

... which is recommended by rspec devs. It simplifies monkey-patches in rspec and would be default option in rspec 3 (old syntax will be probably disabled).

You can read more on rspec dev blog.

jandudulski commented 11 years ago

/cc @sheerun @teamon @Ostrzy @szajbus @chytreg @jcieslar

sheerun commented 11 years ago

ok

szajbus commented 11 years ago

Obviously :+1:

sheerun commented 10 years ago

We can add following to force new syntax:

  config.expect_with :rspec do |c|
    c.syntax = :expect
  end