Skip to content

Instantly share code, notes, and snippets.

@stesla
Created November 20, 2009 16:13
Show Gist options
  • Save stesla/239590 to your computer and use it in GitHub Desktop.
Save stesla/239590 to your computer and use it in GitHub Desktop.
package main
import "./specify"
var spec MySpec;
type mySpec struct {
specify.Specification;
}
func (self *mySpec) That(value specify.Value) specify.That { return self.MyThat(value); }
func (self *mySpec) MyThat(value specify.Value) MyThat {
return &myThat{self.Specification.That(value)};
}
type myThat struct {
specify.That;
}
func (self *myThat) ReallyShould() specify.Matcher { return self.That.Should(); }
type MySpec interface {
specify.Specification;
MyThat(specify.Value) MyThat;
}
type MyThat interface {
specify.That;
ReallyShould() specify.Matcher;
}
func initSpec() {
if spec == nil {
spec = &mySpec{specify.New()};
}
}
func main() {
spec.Run();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment