spec/sync_spec.rb in trackman-0.5.1 vs spec/sync_spec.rb in trackman-0.5.2

- old
+ new

@@ -76,6 +76,29 @@ RemoteAsset.should_receive(:log_exception).once lambda { result = MyTestAsset.autosync }.should_not raise_error end + + it "syncs if the env is not development or test" do + class Rails + def self.env + Env.new + end + end + + class Env + def production? + false + end + def development? + false + end + def test? + false + end + end + MyTestAsset.should_receive(:sync) + + MyTestAsset.autosync + end end \ No newline at end of file