Sha256: 873ebdbe6e34c25f87e3c14b4d7c32012bf5aa49f41ab52abbca171d95004cc8

Contents?: true

Size: 762 Bytes

Versions: 1

Compression:

Stored size: 762 Bytes

Contents

require "#{File.dirname(__FILE__)}/../spec_helper"

shared_examples_for 'a test element' do |clazz|

  before(:each) do
    @element = clazz.new
  end

  it 'has steps - #steps' do
    expect(@element.respond_to?(:steps)).to be true
  end

  it 'can get and set its steps - #steps, #steps=' do
    @element.steps = :some_steps
    expect(@element.steps).to eq(:some_steps)
    @element.steps = :some_other_steps
    expect(@element.steps).to eq(:some_other_steps)
  end

  it 'starts with no steps' do
    expect(@element.steps).to eq([])
  end

  it 'contains steps - #contains' do
    steps = [:step_1, :step_2, :step_3]
    @element.steps = steps

    steps.each { |step| expect(@element.contains).to include(step) }
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cucumber_analytics-1.6.0 testing/rspec/spec/unit/test_element_unit_specs.rb