spec/chanko/invoker_spec.rb in chanko-2.2.1 vs spec/chanko/invoker_spec.rb in chanko-2.3.0
- old
+ new
@@ -1,22 +1,14 @@
require "spec_helper"
module Chanko
describe Invoker do
let(:view) do
- Class.new(ActionView::Base) do
- include Chanko::Invoker
- include Chanko::Helper
- include Chanko::UnitProxyProvider
- end.new
+ controller.helpers
end
let(:controller) do
- Class.new(ActionController::Base) do
- include Chanko::Invoker
- include Chanko::Helper
- include Chanko::UnitProxyProvider
- end.new
+ Class.new(ActionController::Base).new
end
describe "#invoke" do
it "invokes in the same context with receiver" do
expect(view.invoke(:example_unit, :self, :type => :plain)).to eq(view)