Skip to content
forked from mhs/sms-spec

A Ruby library for testing SMS Messages using RSpec and Cucumber.

Notifications You must be signed in to change notification settings

HYPERHYPER/sms-spec

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SMS Spec

An RSpec DSL and Cucumber steps to test SMS interactions with your Ruby on Rails application.

Currently this gem only supports testing SMS messageing using the twilio-ruby gem.

##Setup Add the sms-spec gem to your Gemfile:

group :test do
  gem 'sms-spec'
end

RSpec

In your spec_helper.rb file add the following:

require 'sms_spec'

If you want to have the helpers available in all of your example groups, you can add the following to your spec_helper.rb:

Spec::Runner.configure do |config|
  config.include(SmsSpec::Helpers)
  config.include(SmsSpec::Matchers)
end

Otherwise you will have to incliude the helpers and matchers in any example where you use them:

describe "MyController" do
  include SmsSpec::Helpers
  include SmsSpec::Matchers
end

Cucumber

Add the folloing to you env.rb file:

require 'sms_spec'
require 'sms_spec/cucumber'

This loads the sms_spec RSpec helpers into your cucumber wold. Then, run the following to generate the text_messsage_steps.rb file:

rails generate sms_spec:steps

About

A Ruby library for testing SMS Messages using RSpec and Cucumber.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%