Sha256: 784e3561e32b63e61eef1c6fa22c418029d03f7e3149e4c06d1dba6890fb887c

Contents?: true

Size: 508 Bytes

Versions: 1

Compression:

Stored size: 508 Bytes

Contents

# Sets up unprefixed shortcuts for namespaced open_conference_ware_* 
# fixtures, so that specs can still call users(:quentin) instead of 
# open_conference_ware_users(:quentin)

module FixtureShortcuts
  Dir.glob(OpenConferenceWare::Engine.root.join('spec', 'fixtures', 'open_conference_ware_*.yml')).each do |f|
    f = File.basename(f, '.yml')

    define_method f.sub('open_conference_ware_','') do |*args|
      send(f, *args)
    end
  end
end

RSpec.configure do |c|
  c.include FixtureShortcuts
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
open_conference_ware-1.0.0.pre1 spec/support/fixture_shortcuts.rb