Skip to content

sn method does not work #120

Open
Open
@bruno-

Description

Hi,
for some reason sn nor serial_number methods do not work. Here is the blueprints file:

require 'machinist/active_record'
require 'sham'
require 'faker'

Device.blueprint do
end

Device.blueprint(:enabled) do
token { "RAND-#{sn}" } # generates 4 random digits
last_checkin_time { Time.now }
end

Here is the error I get when running cucumber scenario:

@javascript
Scenario: enabled device is shown in system status # features/dashboard.feature:33
Given there is a device (enabled) # cucumber_factory-1.8.3/lib/cucumber/factory.rb:24
No sham defined for sn (RuntimeError)
./spec/support/blueprints.rb:9:in block (2 levels) in <top (required)>' ./spec/support/blueprints.rb:9:inblock in <top (required)>'
features/dashboard.feature:34:in `Given there is a device (enabled)'

Any suggestions, why is this happening?

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions