Skip to content

Instantly share code, notes, and snippets.

@danielsdeleo
Created October 28, 2009 03:40
Show Gist options
  • Select an option

  • Save danielsdeleo/220214 to your computer and use it in GitHub Desktop.

Select an option

Save danielsdeleo/220214 to your computer and use it in GitHub Desktop.
describe "being compatible with previous implementations" do
it "correctly maps method names to all resource classes" do
@dsl_user.cron("cron").should be_an_instance_of(R::Cron)
@dsl_user.deploy("deploy").should be_an_instance_of(R::Deploy)
@dsl_user.timestamped_deploy("t").should be_an_instance_of(R::TimestampedDeploy)
@dsl_user.deploy_revision("r").should be_an_instance_of(R::DeployRevision)
@dsl_user.deploy_branch("b").should be_an_instance_of(R::DeployBranch)
@dsl_user.directory("foo").should be_an_instance_of(R::Directory)
@dsl_user.execute("bar").should be_an_instance_of(R::Execute)
@dsl_user.file("f").should be_an_instance_of(R::File)
@dsl_user.group("G").should be_an_instance_of(R::Group)
@dsl_user.http_request("H").should be_an_instance_of(R::HttpRequest)
@dsl_user.ifconfig("face").should be_an_instance_of(R::Ifconfig)
@dsl_user.link("zelda").should be_an_instance_of(R::Link)
@dsl_user.mount("equus").should be_an_instance_of(R::Mount)
@dsl_user.package("p").should be_an_instance_of(R::Package)
@dsl_user.apt_package("A").should be_an_instance_of(R::AptPackage)
@dsl_user.dpkg_package("d").should be_an_instance_of(R::DpkgPackage)
#weird, no such thing as freebsd_package
#@dsl_user.freebsd_package("bh").should be_an_instance_of(R::FreebsdPackage)
@dsl_user.portage_package("Porty").should be_an_instance_of(R::PortagePackage)
@dsl_user.gem_package("gemmmm").should be_an_instance_of(R::GemPackage)
# also weird, also no such thing
#@dsl_user.yum_package("Nom").should be_an_instance_of(R::YumPackage)
@dsl_user.remote_directory("Rd").should be_an_instance_of(R::RemoteDirectory)
@dsl_user.remote_file("RF").should be_an_instance_of(R::RemoteFile)
@dsl_user.route("arrr").should be_an_instance_of(R::Route)
@dsl_user.ruby_block("bloxor").should be_an_instance_of(R::RubyBlock)
@dsl_user.scm("not p4").should be_an_instance_of(R::Scm)
@dsl_user.git("yeah").should be_an_instance_of(R::Git)
@dsl_user.subversion("is slow").should be_an_instance_of(R::Subversion)
@dsl_user.script("s").should be_an_instance_of(R::Script)
@dsl_user.bash("thrash").should be_an_instance_of(R::Bash)
@dsl_user.csh("dsh").should be_an_instance_of(R::Csh)
@dsl_user.perl("isn't peridot").should be_an_instance_of(R::Perl)
@dsl_user.python("snakey").should be_an_instance_of(R::Python)
@dsl_user.ruby("duby|dubious").should be_an_instance_of(R::Ruby)
@dsl_user.service("with frown").should be_an_instance_of(R::Service)
@dsl_user.template("ezrubious").should be_an_instance_of(R::Template)
@dsl_user.user("not loser").should be_an_instance_of(R::User)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment