Sha256: 56064ae594dab7f1ca1ec8e863f0ee74fc21f4f6321b58dbd02fe219e7bd0e06
Contents?: true
Size: 528 Bytes
Versions: 3
Compression:
Stored size: 528 Bytes
Contents
require 'spec_helper' require 'render_with_view/rspec_matcher' RSpec.describe 'RSpec matcher' do let(:ctrl) { FakeController.new } subject { ctrl.render_with_view :index, thing: 1 } # short form it { should set_view_local :thing } it { should_not set_view_local :other_thing } # long form it "takes and matches arguments" do expect(subject).to set_view_local(:thing, 1) expect(subject).to_not set_view_local(:thing, 2) end def assigns key ctrl.instance_variable_get("@#{key}".to_sym) end end
Version data entries
3 entries across 3 versions & 1 rubygems