Sha256: 4fc849dae47ec630fbfc5187e89971c54b0e93cd488075074e5be6bc09541716

Contents?: true

Size: 565 Bytes

Versions: 4

Compression:

Stored size: 565 Bytes

Contents

require 'spec_helper'

module <%= @plugin_name %>
  describe ControllerMethods do
    describe "mixed in to a CallController" do

      class TestController < Adhearsion::CallController
        include <%= @plugin_name %>::ControllerMethods
      end

      let(:mock_call) { double 'Call' }

      subject do
        TestController.new mock_call
      end

      describe "#greet" do
        it "greets with the correct parameter" do
          subject.expects(:play).once.with("Hello, Luca")
          subject.greet "Luca"
        end
      end

    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
adhearsion-2.4.0 lib/adhearsion/generators/plugin/templates/spec/plugin-template/controller_methods_spec.rb.tt
adhearsion-2.4.0.beta3 lib/adhearsion/generators/plugin/templates/spec/plugin-template/controller_methods_spec.rb.tt
adhearsion-2.4.0.beta2 lib/adhearsion/generators/plugin/templates/spec/plugin-template/controller_methods_spec.rb.tt
adhearsion-2.4.0.beta1 lib/adhearsion/generators/plugin/templates/spec/plugin-template/controller_methods_spec.rb.tt