<commit_before>require "spec_helper"
require "heroku/command/ps"

describe Heroku::Command::Ps do

  before(:each) do
    stub_core
  end

  context("cedar") do

    before(:each) do
      api.post_app("name" => "myapp", "stack" => "cedar")
    end

    after(:each) do
      api.delete_app("myapp")
    end

    it "ps:dynos errors out on cedar apps" do<commit_msg>fix race condition in ps time based spec<commit_after>require "spec_helper"
require "heroku/command/ps"

describe Heroku::Command::Ps do

  before(:each) do
    stub_core
  end

  context("cedar") do

    before(:each) do
      now = Time.now
      Time.should_receive(:now).any_number_of_times.and_return(now)
      api.post_app("name" => "myapp", "stack" => "cedar")
    end

    after(:each) do
      api.delete_app("myapp")
    end

    it "ps:dynos errors out on cedar apps" do
{'fraction_non_alphanumeric': 0.12971698113207547, 'fraction_numerical': 0.0, 'mean_word_length': 3.287878787878788, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7034212', 'n_tokens_mistral': 308, 'n_tokens_neox': 294, 'n_words': 73}