Sha256: ceaed55256d2e4b2fae2b37aae247fb04c84d6b3c5ecb6dc952f9735ee9c7ca1
Contents?: true
Size: 610 Bytes
Versions: 4
Compression:
Stored size: 610 Bytes
Contents
require 'test_helper' class Nyoibo::CallbackTest < Test::Unit::TestCase class TestApp include Nyoibo::Callback after_upload "/" do "uploaded!" end before_upload '/' do "before" end end context "Run after callback" do setup do @response = Nyoibo.run_callback(:after, "/") end should "fetch response" do assert_equal "uploaded!", @response end end context "Run before callback" do setup do @response = Nyoibo.run_callback(:before, "/") end should "fetch response" do assert_equal "before", @response end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
nyoibo-0.0.3.3 | test/unit/callback_test.rb |
nyoibo-0.0.3.2 | test/unit/callback_test.rb |
nyoibo-0.0.3.1 | test/unit/callback_test.rb |
nyoibo-0.0.3 | test/unit/callback_test.rb |