Sha256: 1b69883ba2f8ebbfe692b36273cd0eff45a41d4849706b23d4bfa7bf8d8027f8

Contents?: true

Size: 1.3 KB

Versions: 3

Compression:

Stored size: 1.3 KB

Contents

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

# class MockControllerUsersController < ActionController::Base
# 
# end
# 
describe "ControllerUserMail", :type => :helper  do
  # controller_name 'MockControllerUsers'
  
  describe "host name" do
    it "should set the host name to localhost:3000" do
      RulesEngine::ControllerUserMail.host.should == "localhost:3000"
    end

    it "should set the host name to the host defined" do
      RulesEngine::ControllerUserMail.host = "mock host"
      RulesEngine::ControllerUserMail.host.should == "mock host"
    end
  end    
  
  describe "from" do
    it "should set the from to Do Not Reply <do_not_reply@localhost:3000>" do
      RulesEngine::ControllerUserMail.from.should == "Do Not Reply <do_not_reply@localhost:3000>"
    end

    it "should set the host name to the host defined" do
      RulesEngine::ControllerUserMail.from = "mock from"
      RulesEngine::ControllerUserMail.from.should == "mock from"
    end
  end    

  describe "prefix" do
    it "should be blank by default" do
      RulesEngine::ControllerUserMail.prefix.should be_blank
    end

    it "should set the host name to the host defined" do
      RulesEngine::ControllerUserMail.prefix = "mock from"
      RulesEngine::ControllerUserMail.prefix.should == "mock from"
    end
  end    
  
end  

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rules_engine_users-0.0.3 spec/rules_engine/controller_user_mail_spec.rb
rules_engine_users-0.0.2 spec/rules_engine/controller_user_mail_spec.rb
rules_engine_users-0.0.1 spec/rules_engine/controller_user_mail_spec.rb