File: pending.rb

package info (click to toggle)
libdataobjects-ruby 0.10.2-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 336 kB
  • ctags: 200
  • sloc: ruby: 2,729; makefile: 2
file content (22 lines) | stat: -rw-r--r-- 351 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
module DataObjects::Spec
  module Pending

    def pending(message = '')
      raise Bacon::Error.new(:pending, message)
    end

    def pending_if(message, boolean)
      if boolean
        pending(message) { yield }
      else
        yield
      end
    end
  end
end

module Bacon
  class Context
    include DataObjects::Spec::Pending
  end
end