Sha256: 7b61a69bd998a18779ce62526ddbaeccd55c8f5833051633039671d29ed8d52b

Contents?: true

Size: 873 Bytes

Versions: 4

Compression:

Stored size: 873 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

describe ShortMessagesController do

  #Delete these examples and add some real ones
  it "should use ShortMessagesController" do
    controller.should be_an_instance_of(ShortMessagesController)
  end


  describe "GET 'index'" do
    it "should be successful" do
      ShortMessage.should_receive(:all)
      get 'index'
      response.should be_success
    end
  end

  describe "GET 'new'" do
    it "should be successful" do
      ShortMessage.should_receive(:new)
      get 'new'
      response.should be_success
    end
  end

  describe "GET 'create'" do
    it "should be successful" do
      short_message = ShortMessage.new
      short_message.should_receive(:save)
      ShortMessage.stub!(:new).and_return(short_message)
      get 'create'
      response.should be_success
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
jnstq-acts_as_sms-0.1.0 test/spec/controllers/short_messages_controller_spec.rb
jnstq-acts_as_sms-0.1.1 test/spec/controllers/short_messages_controller_spec.rb
jnstq-acts_as_sms-0.1.3 test/spec/controllers/short_messages_controller_spec.rb
jnstq-acts_as_sms-0.1.4 test/spec/controllers/short_messages_controller_spec.rb