rspec を使い始めたばかりで、規約expect
の代わりに使用していますshould
。
should
このテスト例を CanCan からに変換するにはどうすればよいexpect
ですか?:
require "cancan/matchers"
# ...
describe "User" do
describe "abilities" do
subject { ability }
let(:ability){ Ability.new(user) }
let(:user){ nil }
context "when is an account manager" do
let(:user){ Factory(:accounts_manager) }
it{ should be_able_to(:manage, Account.new) }
end
end
end