Sha256: c1f87689512abf5d1ad907d577709a67b5eb65d65eac54ca33251391c46d3cb9

Contents?: true

Size: 307 Bytes

Versions: 5

Compression:

Stored size: 307 Bytes

Contents

class Imagery
  module Test
    def self.included(base)
      Imagery.send :include, Imagery::Faking
      Imagery.mode = :fake
    end

  protected
    def imagery
      if ENV["REAL_IMAGERY"]
        Imagery.real { yield true }
      else
        Imagery.faked { yield false }
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
imagery-1.0.0.rc2 lib/imagery/test.rb
imagery-1.0.0.rc1 lib/imagery/test.rb
imagery-0.2.2 lib/imagery/test.rb
imagery-0.2.1 lib/imagery/test.rb
imagery-0.2.0 lib/imagery/test.rb