spec/spec_helper.rb in engineyard-metadata-0.1.2 vs spec/spec_helper.rb in engineyard-metadata-0.2.0

- old
+ new

@@ -1,16 +1,15 @@ require 'rubygems' require 'rspec' require 'active_support/json/encoding' require 'fakeweb' require 'fakefs/safe' +require 'eat' # otherwise it's loaded when fakefs is already active -PRESENT_PUBLIC_HOSTNAME = 'app_master.compute-1.amazonaws.com' -PRESENT_SECURITY_GROUP = 'ey-data1_production-1-2-3' -PRESENT_INSTANCE_ID = 'i-deadbeef' -FAKE_CLOUD_TOKEN = 'FAKE_EY_CLOUD_TOKEN' -FAKE_ENVIRONMENT_NAME = 'FAKE_ENVIRONMENT_NAME' +FAKE_SECURITY_GROUP = 'ey-cm1_production_blue-1294775925-1371-55979' +FAKE_INSTANCE_ID = 'i-ff17d493' +FAKE_CLOUD_TOKEN = 'justareallygreatsecret' def pretend_we_are_on_a_developer_machine FakeWeb.allow_net_connect = false FakeWeb.register_uri :get, "https://cloud.engineyard.com/api/v2/environments", @@ -29,16 +28,16 @@ FakeWeb.allow_net_connect = false # fake call to amazon ec2 api to get present security group FakeWeb.register_uri :get, "http://169.254.169.254/latest/meta-data/security-groups", :status => ["200", "OK"], - :body => PRESENT_SECURITY_GROUP + :body => FAKE_SECURITY_GROUP # fake call to amazon ec2 api to get present instance id FakeWeb.register_uri :get, "http://169.254.169.254/latest/meta-data/instance-id", :status => ["200", "OK"], - :body => PRESENT_INSTANCE_ID + :body => FAKE_INSTANCE_ID # first read a file from the real file system... dna_json = File.read File.join(File.dirname(__FILE__), 'support', 'dna.json') # ... then turn on the fakefs FakeFS.activate! \ No newline at end of file