Module: Dbtap
- Included in:
- CLI
- Defined in:
- lib/dbtap.rb,
lib/dbtap/cli.rb,
lib/dbtap/tapper.rb,
lib/dbtap/version.rb,
lib/dbtap/testers/set_eq.rb,
lib/dbtap/testers/tester.rb,
lib/dbtap/testers/performs_within.rb
Defined Under Namespace
Classes: CLI, PerformsWithin, SetEq, Tapper, Tester
Constant Summary collapse
- VERSION =
"0.0.3"
Instance Method Summary collapse
-
#define_tests(&block) ⇒ Object
Starts a new set of tests.
Instance Method Details
#define_tests(&block) ⇒ Object
Starts a new set of tests. Use like so:
require 'dbtap'
include Dbtap
define_tests do
set_eq(db[:table], db['select * from table'],
'Sequel selects all from table')
# Your other tests here
end
Within the block, ‘db` is defined as a Sequel-based connection to your database as defined by your Sequelizer configuration
18 19 20 21 22 |
# File 'lib/dbtap.rb', line 18 def define_tests(&block) t = Tapper.new t.instance_eval(&block) t.run end |