Sha256: 695110125db7e67e264ba8bd760bf0a89bfc563e6ced40374b934491f9d5872c

Contents?: true

Size: 905 Bytes

Versions: 4

Compression:

Stored size: 905 Bytes

Contents

FancySpec describe: "Documentations" with: {
  it: "should display the documentation for a method" when: {
    documentation = "Array#each: iterates over its elements, calling a given block with each element."
    Array new method: "each:" . documentation: documentation
    Array new method: "each:" . documentation . docs first should == documentation
  }

  it: "should define a documenation string for a class and method" when: {
    class ClassWithDoc {
      "This class has a documentation! Yay!"
      def foo {
        "bar!"
        nil
      }
    }
    ClassWithDoc documentation should_not == ""
    ClassWithDoc documentation should == "This class has a documentation! Yay!"
    ClassWithDoc new method: 'foo . documentation docs should == ["bar!"]
  }

  it: "should have a documentation string for a method" when: {
    Array new method: "first" . documentation should_not be: 'nil?
  }
}

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
fancy-0.3.3 tests/documentation.fy
fancy-0.3.2 tests/documentation.fy
fancy-0.3.1 tests/documentation.fy
fancy-0.3.0 tests/documentation.fy