Sha256: 0b4fb0a7630d42e0046084a1153c985eb1de529ed94209d48683063024afc856

Contents?: true

Size: 572 Bytes

Versions: 12

Compression:

Stored size: 572 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.should_receive(:play).once.with("Hello, Luca")
          subject.greet "Luca"
        end
      end

    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
adhearsion-2.6.4 lib/adhearsion/generators/plugin/templates/spec/plugin-template/controller_methods_spec.rb.tt
adhearsion-2.6.3 lib/adhearsion/generators/plugin/templates/spec/plugin-template/controller_methods_spec.rb.tt
adhearsion-3.0.0.rc1 lib/adhearsion/generators/plugin/templates/spec/plugin-template/controller_methods_spec.rb.tt
adhearsion-3.0.0.beta2 lib/adhearsion/generators/plugin/templates/spec/plugin-template/controller_methods_spec.rb.tt
adhearsion-3.0.0.beta1 lib/adhearsion/generators/plugin/templates/spec/plugin-template/controller_methods_spec.rb.tt
adhearsion-2.6.2 lib/adhearsion/generators/plugin/templates/spec/plugin-template/controller_methods_spec.rb.tt
adhearsion-2.6.1 lib/adhearsion/generators/plugin/templates/spec/plugin-template/controller_methods_spec.rb.tt
adhearsion-2.6.0 lib/adhearsion/generators/plugin/templates/spec/plugin-template/controller_methods_spec.rb.tt
adhearsion-2.5.4 lib/adhearsion/generators/plugin/templates/spec/plugin-template/controller_methods_spec.rb.tt
adhearsion-2.5.3 lib/adhearsion/generators/plugin/templates/spec/plugin-template/controller_methods_spec.rb.tt
adhearsion-2.5.2 lib/adhearsion/generators/plugin/templates/spec/plugin-template/controller_methods_spec.rb.tt
adhearsion-2.5.0 lib/adhearsion/generators/plugin/templates/spec/plugin-template/controller_methods_spec.rb.tt