<commit_before>require File.expand_path('../../../spec_helper', __FILE__)

describe MavenJnlp::MavenJnlpServer do
  before(:each) do
    @valid_attributes = {
      :uuid => "value for uuid",
      :host => "value for host",
      :path => "value for path",
      :name => "value for name",
      :local_cache_dir => "value for local_cache_dir"
    }
  end

  it "should create a new instance given valid attributes" do
    MavenJnlp::MavenJnlpServer.create!(@valid_attributes)
  end

  it "should run update_maven_jnlp_server_object" do
    server = Factory.create(:maven_jnlp_maven_jnlp_server)
    server.update_maven_jnlp_server_object
  end
end
<commit_msg>maven_jnlp_server_spec.rb : Mock web request to jnlp server<commit_after>require File.expand_path('../../../spec_helper', __FILE__)

describe MavenJnlp::MavenJnlpServer do
  before(:each) do
    @valid_attributes = {
      :uuid => "value for uuid",
      :host => "value for host",
      :path => "value for path",
      :name => "value for name",
      :local_cache_dir => "value for local_cache_dir"
    }
    stub_request(:get, /maven-jnlp/).
       with(:headers => {'Accept'=>'*/*', 'User-Agent'=>'Ruby'}).
       to_return(:status => 200, :body => "", :headers => {})
  end

  it "should create a new instance given valid attributes" do
    MavenJnlp::MavenJnlpServer.create!(@valid_attributes)
  end

  it "should run update_maven_jnlp_server_object" do
    server = Factory.create(:maven_jnlp_maven_jnlp_server)
    server.update_maven_jnlp_server_object
  end
end

{'fraction_non_alphanumeric': 0.12890625, 'fraction_numerical': 0.001953125, 'mean_word_length': 3.7003058103975537, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 19, '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': '6606770', 'n_tokens_mistral': 535, 'n_tokens_neox': 518, 'n_words': 119}