Sha256: 4877df87ffaa3ea15c605f67cbe50b564b54d9e7ac98239d0df69656ea9f97af

Contents?: true

Size: 1.28 KB

Versions: 3

Compression:

Stored size: 1.28 KB

Contents

require 'spec_helper'

lib = File.expand_path('../../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)

# The lines above are required. The rest depends on your gem.

require "template_gem"

describe TemplateGem do
  # Use each describe block to separate out the behaviors for a specific scenario
  describe "A new Norris knows about itself -" do
    # Use each it block to describe a specific function within a behavior
    it "what its firstname is..." do
      norris=TemplateGem::NorrisIt.new
      
      norris.respond_to?(:first_name).should equal(true)

      # Note that equivalence with strings should use value-equivalence with :eq, not object
      # equivalence with :equal
      norris.first_name.should eq('chuck')
    end

    it "and what its lastname is." do
      norris=TemplateGem::NorrisIt.new
      
      norris.respond_to?(:last_name).should equal(true)

      # Note that equivalence with strings should use value-equivalence with :eq, not object
      # equivalence with :equal
      norris.last_name.should eq('norris')
    end
  end

  describe "When Chuck says something" do
    before do
      @chucks_lines=TemplateGem::NorrisIt.new
    end
    it "for sure, it ain't nothing" do
      @chucks_lines.what_chuck_says.size.should be>(0)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
template_gem-1.0.2 spec/tc_norris_spec.rb
template_gem-1.0.1 spec/tc_norris_spec.rb
template_gem-1.0.0 spec/tc_norris_spec.rb