Sha256: 74085cb01db5f7ba5696ba57e5f6c27ef84257f60880b30734a23b84b495f056

Contents?: true

Size: 1.08 KB

Versions: 2

Compression:

Stored size: 1.08 KB

Contents

begin
  require 'rspec/expectations';
rescue LoadError;
  require 'spec/expectations';
end
require 'cucumber/formatter/unicode'
$:.unshift(File.dirname(__FILE__) + '/../../lib')
require 'imdb'

Before do
end

After do
end

Given /I have person with id "(.*)"/ do |n|
  @result = IMDB::Person.new(n.to_s)
end

Then /^the name should be "(.*)"$/ do |name|
  @result.name.should == name
end

Then /^the films where he was actor should be "(.*)"$/ do |number|
  res=@result.filmography
  res.length.should == number.to_i
end

Then /^the height of the actor should be "(.*)"$/ do |height|
  @result.height.should == height.to_s
end

Then /^the photo should be a link to an image$/ do
  @result.photo.should be_kind_of String
  @result.photo.should =~ /^http:.*jpg$/
end

When /^the birth date should be "([^"]*)"$/ do |arg|
  @result.birthdate.should == Date.parse(arg)
end

When /^the profile path shuld be "([^"]*)"$/ do |arg|
  @result.profile_path.should == arg
end

When /^the real name shoud be "([^"]*)"$/ do |arg|
  @result.real_name.should == arg
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
imdb-scan-0.0.2 features/step_definitions/person_steps.rb
imdb-scan-0.0.1 features/step_definitions/person_steps.rb